package homeworkIOC;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class IOCwork {
	public static void main(String[] args){
		ApplicationContext context = new ClassPathXmlApplicationContext("IOCwork-context.xml");		
		FileWriterService fws = context.getBean("fws",FileWriterService.class);
		String con = fws.getContent();
		fws.write(con);
		((ConfigurableApplicationContext) context).close();
	}
}
